<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>neighbors</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab function</center>
    <div align="right">Last update : September 1996</div>
    <p>
      <b>neighbors</b> -  nodes connected to a node</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>a = neighbors(i,g)  </tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>i</b>
        </tt>: integer</li>
      <li>
        <tt>
          <b>g</b>
        </tt>: graph list</li>
      <li>
        <tt>
          <b>a</b>
        </tt>: vector of integers</li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>
      <tt>
        <b>neighbors</b>
      </tt> returns the numbers of the nodes connected with node i for 
    graph <tt>
        <b>g</b>
      </tt> (directed or not).</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

ta=[1  6  2  4  7  5  6  8  4  3  5  1];
he=[2  1  3  6  4  8  8  7  2  7  3  5];
g=make_graph('foo',1,8,ta,he);
g('node_x')=[285  284  335  160  405  189  118  45];
g('node_y')=[266  179   83  176  368  252  64  309];
show_graph(g);
a=neighbors(6,g)
show_nodes(a);
 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="predecessors.htm">
        <tt>
          <b>predecessors</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="successors.htm">
        <tt>
          <b>successors</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
  </body>
</html>
